<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="layout" content="portalForAppTemplate"/>
    <title>免费评房</title>

</head>

<body>
<nav class="nav">
    <a href="/portalForApp/create2Step1?contact=${this.contactId}"><</a>
    确认小区信息
</nav>
<header class="create-header">
        <ul class="creat-flowList flex-box">
            <li data-id="01" class="flex1 active">
                <span></span>

                <h3>小区信息</h3>
            </li>
            <li data-id="02" class="flex1 line">
                <span></span>

                <h3>押品信息</h3>
            </li>
            <li data-id="03" class="flex1 line">
                <span></span>

                <h3>极速询值</h3>
            </li>
        </ul>
</header>

<div class="createStep2 bgcWhite">
    <div class="weui_panel weui_panel_access">
        <g:if test="${projectNameList.size== 0}">
            <div class="weui_panel_hd">您要找的小区可能是</div>
        </g:if>
        <g:else>
        <div class="weui_panel_bd addressList" >
            <div class="weui_panel_hd">您要找的小区可能是</div>
            <g:each in="${projectNameList}" >
                %{--<g:if test="${entry}">--}%
                    <div class="weui_media_box weui_media_text addressItem">
                        <h4 class="weui_media_title">${it?.communityName}</h4>
                        <p class="weui_media_desc">${it?.address}</p>

                    </div>
                %{--</g:if>--}%
            </g:each>
        </div>
        </g:else>
    </div>
    <h4 class="colorRed" style="margin-top: 4px">未找到对应的小区？</h4>
    <div class="deleteInfo">
        %{--<g:link class="link" controller="wechatOpportunity" action="Create2Step1" params="[code: null, state: null]">再次尝试</g:link>--}%
        <g:link class="link" controller="portalForApp" action="create2Step1" params="[contact: this.contactId]">再次尝试</g:link>

        <div class="link" id="submitBtn2">直接提交</div>
    </div>
</div>

<form resource="${this.house?.id}" action="create2Step3" id="Create2Form2" method="post" class="Create2Form2">
    <input type="hidden" name="projectName" id="projectName"/>
    <input type="hidden" name="city" value="${this.house.city.id}"/>
    <input type="hidden" name="district" value="${this.house.district}"/>
    <input type="hidden" name="contactId" value="${this.contactId}"/>
    <input type="hidden" name="projectName2" value="${this.params2.projectName}"/>
</form>

%{--<div class="client-hotline2">--}%
    %{--<a href="tel:${com.next.ContactLoginCertificate.findByExternalId(openId)?.contact?.city?.telephone}" class="hotline">--}%
        %{--<g:img class="hotlineIcon" dir="images" file="hotline-icon.png"/>--}%
        %{--<span class="city-hotline">${com.next.ContactLoginCertificate.findByExternalId(openId)?.contact?.city?.telephone}</span>--}%
    %{--</a>--}%
%{--</div>--}%

%{--提示信息和验证--}%
<div class="message-box">
    <div class="helpMsg hide"></div>
    <g:if test="${flash.message}">
        <div class="message" role="status">
            ${flash.message}
        </div>
    </g:if>
</div>

<script>
    $(function(){
        $(".addressList").delegate(" .addressItem", "click", function () {
            var housecell = $(this).children("h4").text().trim();
            $("#projectName").val(housecell);
            $("#Create2Form2").submit();
        });

        $("#submitBtn2").click(function () {
            $("#form-address").val("");
            $("#Create2Form2").submit();
        });

        setTimeout(function () {
            $(".message").fadeOut(200);
        }, 2000);
    })
</script>

    <script type="text/javaScript">


    </script>
</body>
</html>
